你需要替换掉huanf-xue-content/xue-content-service/src/main/java/com/huanf/content/feignclient/SearchServiceClient.java

package com.huanf.content.feignclient;

import com.huanf.po.CourseIndex;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: 35238
 * 功能: xue-content-service模块 远程调用 xue-search-api模块
 * 时间: 2024-06-07 22:09
 */
//下一行的value值要跟huanf-xue-search模块的bootstrap.yml文件的spring.application.name值一致
@FeignClient(value = "search-api", fallbackFactory = SearchServiceClientFallbackFactory.class)
@Service
public interface SearchServiceClient {

    //下一行的接口请求地址必须是huanf-xue-search模块已存在的接口请求地址
    @PostMapping("/search/index/course")
    Boolean add(@RequestBody CourseIndex courseIndex);

    @GetMapping("/search/index/del/{id}")
    Boolean del(@PathVariable("id") String id);
}
